#!/usr/bin/env python
# -- coding: utf-8 --
# author：马海晨
# time:2025/4/26
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time
class BasePage:
    def __init__(self, driver):
        self.driver = driver
    def find_ele(self, xpath):
        try:
               self.driver.implicitly_wait(10)
               ele=self.driver.find_element(By.XPATH, xpath)
               return ele
        except Exception as e:
            print("元素未找到")

    def find_eles(self, xpath):
        try:
            self.driver.implicitly_wait(10)
            ele_list = self.driver.find_elements(By.XPATH, xpath)
            return ele_list
        except Exception as e:
            print("元素未找到")